Service management in distributed system

ABSTRACT

An approach for service management in a distributed system may be provided. The approach may include obtaining a first service record for a first service that is deployed in a first cluster in a distributed system, the first service record may be represented in a global registry format defined in the distributed system. Additionally, the approach may include calling a first service entrance for the first service based on the first service record, the first service entrance may enable a second service, deployed in a second cluster in the distributed system, to call the first service. Further, the approach may include providing the first service entrance to the second cluster.

BACKGROUND

The present invention relates to distributed system management,specifically, managing services deployed across multiple clusters in thedistributed system.

A distributed system may be implemented in a heterogeneous structure andprovide various services. The distributed system may comprise multipleclusters, and each cluster may have its own registry policy for managingservices that are deployed in the cluster. For example, one cluster mayrelate to a Kubernetes®, framework and another cluster may relate to aSpring Cloud® framework. Services in the same cluster may be managed bythe same registry policy, which enables these services to call eachother. However, as different clusters may have different registrypolicies for managing their own services, a service deployed in onecluster cannot call another service deployed in another cluster.

SUMMARY

According to one embodiment of the present invention, there is provideda computer-implemented method that may be implemented by one or moreprocessors. In the method, one or more processors obtain a first servicerecord for a first service that is deployed in a first cluster in adistributed system, the first service record being represented in aglobal registry format defined in the distributed system. One or moreprocessors determine a first service entrance for calling the firstservice based on the first service record, the first service entranceenabling a second service to call the first service, the second servicebeing deployed in a second cluster in the distributed system. One ormore processors provide the first service entrance to the secondcluster.

According to another embodiment of the present invention, there isprovided a computer-implemented system. The computer-implemented systemcomprises a computer processor coupled to a computer-readable memoryunit, where the memory unit comprises instructions that when executed bythe computer processor implements the above method.

According to another embodiment of the present invention, there isprovided a computer program product. The computer program productcomprises a computer readable storage medium having program instructionsembodied therewith. The program instructions are executable by anelectronic device to cause the electronic device to perform actions ofthe above method.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

Through the more detailed description of some embodiments of the presentdisclosure in the accompanying drawings, the above and other objects,features and advantages of the present disclosure will become moreapparent, wherein the same reference generally refers to the samecomponents in the embodiments of the present disclosure.

FIG. 1 depicts a cloud computing node according to an embodiment of thepresent invention.

FIG. 2 depicts a cloud computing environment according to an embodimentof the present invention.

FIG. 3 depicts abstraction model layers according to an embodiment ofthe present invention.

FIG. 4 depicts a block diagram of a distributed system according to anembodiment of the present invention.

FIG. 5 depicts a procedure for managing a service in a distributedsystem according to an embodiment of the present invention.

FIG. 6 depicts a flowchart of an example method for managing a servicein a distributed system according to an embodiment of the presentinvention.

FIG. 7 depicts a procedure for communications among clusters in thedistributed system according to an embodiment of the present invention.

FIG. 8 depicts a procedure for distributing the message queue accordingto an embodiment of the present invention.

FIG. 9 depicts a procedure for calling a service in a cluster by anotherservice in another cluster according to an embodiment of the presentinvention.

DETAILED DESCRIPTION

Some embodiments will be described in more detail with reference to theaccompanying drawings, in which the embodiments of the presentdisclosure have been illustrated. However, the present disclosure can beimplemented in various manners, and thus should not be construed to belimited to the embodiments disclosed herein.

It is to be understood that although this disclosure includes a detaileddescription of cloud computing, implementation of the teachings recitedherein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g., networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure that includes anetwork of interconnected nodes.

Referring now to FIG. 1, a schematic of a cloud computing node is shown.Cloud computing node 1 is only one example of a suitable cloud computingnode and is not intended to suggest any limitation as to the scope ofuse or functionality of embodiments of the invention described herein.Regardless, cloud computing node 1 is capable of being implementedand/or performing any of the functionality set forth hereinabove.

In cloud computing node 1 there is a computer system/server 12 or aportable electronic device such as a communication device, which isoperational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 12 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processing unit 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnect (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Referring now to FIG. 2, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 5 includes one or morecloud computing nodes 1 with which local computing devices used by cloudconsumers, such as, for example, personal digital assistant (PDA) orcellular telephone 5A, desktop computer 5B, laptop computer 5C, and/orautomobile computer system 5N may communicate. Nodes 1 may communicatewith one another. They may be grouped (not shown) physically orvirtually, in one or more networks, such as Private, Community, Public,or Hybrid clouds as described hereinabove, or a combination thereof.This allows cloud computing environment 5 to offer infrastructure,platforms and/or software as services for which a cloud consumer doesnot need to maintain resources on a local computing device. It isunderstood that the types of computing devices 5A-N shown in FIG. 2 areintended to be illustrative only and that computing nodes 1 and cloudcomputing environment 5 can communicate with any type of computerizeddevice over any type of network and/or network addressable connection(e.g., using a web browser).

Referring now to FIG. 3, a set of functional abstraction layers providedby cloud computing environment 5 (FIG. 2) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 3 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include: mainframes 61; RISC(Reduced Instruction Set Computer) architecture based servers 62;servers 63; blade servers 64; storage devices 65; and networks andnetworking components 66. In some embodiments, software componentsinclude network application server software 67 and database software 68.Virtualization layer 70 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers71; virtual storage 72; virtual networks 73, including virtual privatenetworks; virtual applications and operating systems 74; and virtualclients 75.

In one example, management layer 80 may provide the functions describedbelow. Resource provisioning 81 provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 82provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may include applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 83 provides access to the cloud computing environment forconsumers and system administrators. Service level management 84provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 85 provides pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 90 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 91; software development and lifecycle management 92; virtualclassroom education delivery 93; data analytics processing 94;transaction processing 95; and service management processing 96.

It should be noted that the service management processing 96 accordingto embodiments of the present invention could be implemented by computersystem/server 12 of FIG. 1. Reference will be made to FIG. 4 for ageneral description of a working environment of embodiments of thepresent invention. FIG. 4 depicts a block diagram of a distributedsystem 400 according to an embodiment of the present invention. In FIG.4, the distributed system 400 comprises multiple clusters, such as acluster named as cluster-a 410 and a cluster named as cluster-b 420, andso on. Here, the multiple clusters may be generated by usingheterogeneous frameworks like Spring Cloud®, Kubernetes®, Consul®,MicroProfile®, or any generally known or future known frameworks forgenerating clusters in. Each of these clusters may comprise one or moreservices for providing different functions.

Each cluster may have its own registry policy, and services belong to aspecific cluster should obey a corresponding registry policy. There havebeen proposed several service registry policies such as Etcd®, Consul®,Eureka, Zookeeper®, and so on. For example, the cluster-a 410 may bebased on the Spring Cloud® framework and services (such as a service-a412, and so on) may follow the Eureka registry policy. Here, a localregistry 414 is provided for managing services belong to the cluster-a410 based on the Eureka registry policy. Similarly, the cluster-b 420may be based on the Kubernetes® framework and services (such as aservice-b 422, and so on) may follow the Zookeeper® registry policy.Here, a local registry 424 is provided for managing services belong tothe cluster-b 420 based on the Zookeeper® registry policy. Althoughservices in each cluster may call services belong to its own cluster,the different registry policies are usually incompatible with eachother, and thus a service registered in a cluster cannot call anotherservice registered in another cluster. Although FIG. 4 illustrates thattwo clusters are comprised in the distributed system 400, thedistributed system 400 may comprise more than two clusters, and eachcluster may adopt the same or different cluster framework and/orregistry policies.

In view of the above drawbacks, embodiments of the present inventionprovide a service management solution for enabling a service in onecluster to call a desired service in another cluster. Reference will bemade to FIG. 5 for a brief description of embodiments of the presentinvention. FIG. 5 depicts a procedure 500 for managing a service in thedistributed system according to an embodiment of the present invention.As depicted in FIG. 5, a registry controller may be deployed in eachcluster for managing the service(s) belong to the cluster. Depending onfunctions of the registry controllers, the registry controllers may beclassified into a primary type and a secondary type. For example, in thesituation of two clusters being comprised in the distributed system 400,a registry controller 510 may be deployed in the cluster-a 410 and aregistry controller 520 may be deployed in the cluster-b 420. Asillustrated in FIG. 5, the registry controller 520 may be selected by aregistry selector 530 as a primary one for coordinating the otherregistry controller(s) (such as the registry controller 510).

In FIG. 5, the local registries 414 and 424 represent registrycontrollers for managing the services in the respective clusters basedon the existing registry policies, respectively. For example, the localregistry 414 may obtain the local service record in the cluster-a 410and manage the service-a 412 based on the Eureka registry policy, andthe local registry 424 may obtain the local service record in thecluster-b 420 and manage the service-b 422 based on the Zookeeper®registry policy. Here, the local service records may be represented inrespective local registry formats, and the registry controllers 510 and520 may convert the local service records into service records that arerepresented by a global format defined in the distributed system 400.Therefore, the service in one cluster may be exposed to other servicesin other clusters based on the converted service records, such thatthese services may call each other across different clusters.

Hereinafter, reference will be made to FIG. 6 for more details about thepresent invention. FIG. 6 depicts a flowchart of an example method 600for managing a service in a distributed system according to anembodiment of the present invention. At a block 610, a first servicerecord may be obtained for a first service that is deployed in a firstcluster in a distributed system 400. Here, the first service record isrepresented in a global registry format defined in the distributedsystem 400. In embodiments of the present invention, the first servicerecord may be received from a first registry controller that is deployedin the first cluster.

Referring back to FIG. 5 for more details, the registry controller 510may be deployed in the cluster-a 410 for obtaining the service recordfor the service-a 412. Here, the registry controller 510 may be deployedin a computing device comprised in the cluster-a 410. There may bemultiple computing devices in the cluster-a 410 and one computing devicemay be selected for deploying the registry controller 510. For example,a server for managing the cluster-a 410 may be selected. The registrycontroller 510 may collect a local service record for the service-a 412from the local registry 414. Here, the collected local service recordmay be defined based on the Eureka registry policy and then the registrycontroller 510 may convert the local service record into a globalregistry format defined in the distributed system 400. Similarly, theregistry controller 520 in the cluster-b 420 may collect a local servicerecord (for example, in a format meeting the Zookeeper® registry policy)for the service-b 422 from the local registry 424, and then convert thecollected local service record into the global registry format.

In embodiments of the present invention, the method 600 may beimplemented at a primary registry controller that is deployed in acluster in the distributed system 400. For example, the method 600 maybe implemented at the registry controller 520, which is selected fromthe multiple registry controllers deployed in the multiple clusters,respectively. For example, a healthy registry controller with relativebetter performance may be selected as the primary registry controller.In order to find the healthy registry controller, the performance ofeach registry controller in each cluster may be monitored. Specifically,the state of the device on which the registry controller is deployed maybe monitored.

For example, the monitored parameters may comprise but not limited tothe Graphics Processing Unit (GPU) usage, the memory usage, theApplication Programming Interface (API) calling number/frequency, thefailed call number/frequency, whether the registry controller works asthe primary registry controller, the last time when the registrycontroller worked as the primary registry, the number/frequency for theregistry controller working as the primary registry, the size of thecorresponding cluster, the framework type of the cluster, and so on.

In embodiments of the present invention, one or more of the aboveparameters may be considered for selecting the primary registrycontroller. For example, a registry controller that is deployed in adevice with the lowest GPU usage may be selected. In another example,the above parameters may be weighted for determining a health score foreach registry controller, and then a registry controller with thehighest health score may be selected as the primary registry controller.

In embodiments of the present invention, machine learning techniques maybe adopted for selecting the primary registry controller. For example, astate predicting model may be trained based on historical statescollected at various historical time points, and then the statepredicting model may be used to predicate a state of a device for afuture time duration. Here, the state predicting model may be builtbased on various machine learning networks such as the Long Short TermMemory (LSTM) network, and so on. With respect to a specific cluster,the history states (e.g., collected at one or more previous time pointswithin the recent hours) may be input into the state predicting modeland a future state for the upcoming hours may be predicted. Based on thepredicted future state for each cluster, a registry controller with thebest future state may be selected as the primary registry controller.

During operations of the distributed system 400, states of the pluralityof devices may change and another selecting procedure may be triggeredensuring that the best registry controller always works as the primaryregistry controller. In embodiments of the present invention, a timerwith a time length of 5 hours (or other values) may be defined for thecurrent primary registry controller. Once the timer is expired, anotherregistry controller may be selected as the primary registry controller;alternatively, the current primary registry controller may bere-selected. In another example, the selecting procedure may betriggered if a failure occurs in the current primary registrycontroller. Once the primary registry controller is selected, otherregistry controllers may be identified as the secondary registrycontrollers. With these embodiments, a registry controller with the bestperformance may be the primary controller for the secondary registrycontrollers. Allowing for performance of service management to beimplemented in more effectively.

The above paragraph has described details for obtaining the servicerecord for each service in each cluster. With the obtained servicerecords in the global format, a service entrance may be determined fordiscovering and calling each service. Referring back to FIG. 6, at ablock 620, a first service entrance for calling the first service may bedetermined based on the first service record. Here, the first serviceentrance enables a second service that is deployed in a second clusterto call the first service. For example, once the registry controller 520obtains the service record for the service-a 412, the registrycontroller 520 may determine the service entrance for calling theservice-a 412 by another service in another cluster.

In embodiments of the present invention, the service entrance may bedetermined based on an access address of the first service in the firstcluster. Specifically, an identification of the first service and anidentification of the first cluster may be used for determining theservice entrance: “service ID.cluster ID.” With respect to the service-a412 in the cluster-a 410, the service entrance may be determined basedon the identification of the service (“service-a”) and theidentification of the cluster (“cluster-a”). In one example, the serviceentrance for the service-a 412 may be represented by:service-a.cluster-a. Further, the service-b 422 in the cluster-b 420 maycall the service-a 412 in the cluster-a 410 by using the serviceentrance of “service-a.cluster-a”.

It is to be understood that the above format is just an example, inother embodiments of the present invention, the service entrance may berepresented by another format. For example, positions of the service IDand the cluster ID may be swapped, or another symbol such as “→” may beused for connecting the service ID and the cluster ID. In otherembodiments of the present invention, the access address stored in a logfile may be used for determining the service entrance. It is to beunderstood, the above paragraph just provides an example for determiningthe service entrance for discovering and calling the service-a 412 fromanother service in another cluster. Further, a corresponding serviceentrance may be generated for each service in each cluster. For example,another service entrance “service-b.cluster-b” may be generated by theregistry controller 520 for the service-b 422 in the cluster-b 420. Withthese embodiments, the registry controller 520, which works as theprimary registry controller 520, may generate respective serviceentrances for discovering and calling respective services among variousclusters. Allowing services in different clusters to call each other byusing the corresponding service entrances.

Hereinafter, reference will be made back to FIG. 6 for more detailsabout distributions of the determined service entrances. At block 630,the first service entrance may be provided to the second cluster.Specifically, the registry controller 520 may add multiple serviceentrances for multiple services into a message queue, and reference willbe made to FIG. 7 for more details. FIG. 7 depicts a procedure 700 forcommunications among clusters in the distributed system 400 according toan embodiment of the present invention. In FIG. 7, the secondaryregistry controller 510 may send 710 to the primary registry controller520 the service entrance for the service-a 412, and then the primaryregistry controller 520 may add the service entrance into the messagequeue 720. Further, the primary registry controller 520 may add theservice entrance for the service-b 422 into the message queue 720. It isto be understood that FIG. 7 only illustrates the service-a 412 and theservice-b 422. In other embodiments of the present invention, thedistributed system 400 may comprise more services and then the primaryregistry controller 520 may add more service entrances for the moreservices into the message queue 720.

Further, service entrances in the message queue 720 may be distributedto the respective clusters. For example, each service entrance in themessage queue 720 may be transmitted to the respective clusters.Specifically, the service entrance for the service-b 422 may betransmitted 730 to the cluster-a 410, for example, via the secondaryregistry controller 510; and the service entrance for the service-a 412may be transmitted 732 to the cluster-b 420, for example, via theprimary registry controller 520. With these embodiments, each clustermay be provided with the service entrance for calling service(s) outsidethe cluster. Therefore, service(s) in each cluster may call otherservice(s) in other cluster(s) in a more effective way.

In some embodiments of the present invention, data in the message queue720 may be encoded into a message packet, such that redundancy data maybe included in the message packet during communication. FIG. 8 depicts aprocedure 800 for distributing the message queue according to anembodiment of the present invention. In FIG. 8, source data 810represents the data that are originally stored in the message queue 720.In order to increase the security of the data distribution, redundancydata such as the error correction code may be included in the encodeddata 820. At this point, even if one or more data block fails to reachthe target cluster in the received data 830, data in the message queue720 may be reconstructed from the received data. For example, if a block822 which relates to the redundancy data is lost during the datacommunication, the received data 830 is still enough for reconstructingthe message queue 720. With these embodiments, the service may bemanaged in a robust, secure, and effective way.

In embodiments of the present invention, one service may be instructedto use the received service entrance to call the corresponding servicein another cluster. FIG. 9 depicts a procedure 900 for calling a servicein a cluster by another service in another cluster according to anembodiment of the present. Here, services that are defined in onecluster may be discovered by services that are defined in anothercluster. In FIG. 9, the service entrance in the message queue may bediscovered as external services 910. Specifically, “service-b.cluster-b”may be used by the service-a 412 for calling the service-b 422 in thecluster-b 420.

It is to be understood that FIG. 9 shows a situation where only oneservice-b 422 is deployed in the cluster-b 420, alternatively and/or inaddition to, more clusters may be comprised in the distributed system400 and more services may be deployed in each cluster. Supposing aservice named “service-c” is deployed in a cluster named “cluster-c”(not depicted) in the distributed system 400, then a registry controllermay be deployed in the cluster-c, and a service entrance“service-c.cluster-c” may be transmitted to each of cluster-a 410 andcluster-b 420. At this point, the external services 910 may compriseanother service entrance “service-c.cluster-c” (not depicted) forenabling the service-a 412 to call the service-c in the cluster-c. Withthese embodiments, one service in one cluster is not limited to callservices that are defined in its own cluster. Instead, the one servicein one cluster may call all services that are defined in the distributedsystem 400, regardless of whether the services are internal services orexternal services. Therefore, services are shared and reused among allthe clusters in the distributed system 400.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a computer, or other programmable data processing apparatusto produce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks. These computerreadable program instructions may also be stored in a computer readablestorage medium that can direct a computer, a programmable dataprocessing apparatus, and/or other devices to function in a particularmanner, such that the computer readable storage medium havinginstructions stored therein comprises an article of manufactureincluding instructions which implement aspects of the function/actspecified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be accomplished as one step, executed concurrently,substantially concurrently, in a partially or wholly temporallyoverlapping manner, or the blocks may sometimes be executed in thereverse order, depending upon the functionality involved. It will alsobe noted that each block of the block diagrams and/or flowchartillustration, and combinations of blocks in the block diagrams and/orflowchart illustration, can be implemented by special purposehardware-based systems that perform the specified functions or acts orcarry out combinations of special purpose hardware and computerinstructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A computer-implemented method comprising:obtaining, by one or more processors, a first service record for a firstservice that is deployed in a first cluster in a distributed system, thefirst service record being represented in a global registry formatdefined in the distributed system; monitoring, by the one or moreprocessors, a plurality of states of a plurality of devices; selecting,by the one or more processors, a primary registry controller from aplurality of registry controllers based on the plurality of states,wherein the computer-implemented method is executed at the primaryregistry controller that is deployed in a first cluster in thedistributed system; determining, by the one or more processors, a firstservice entrance for calling the first service based on the firstservice record, the first service entrance enabling a second service tocall the first service, the second service being deployed in a secondcluster in the distributed system; and providing, by the one or moreprocessors, the first service entrance to the second cluster.
 2. Thecomputer-implemented method of claim 1, wherein the obtaining the firstservice record comprises: receiving, by the one or more processors, thefirst service record from a first registry controller that is deployedin the first cluster, the first service record being generated by thefirst registry controller based on a local service record that isrepresented in a local registry format defined in the first cluster. 3.The computer-implemented method of claim 1, wherein the determining thefirst service entrance for the first service comprises: determining, byone or more processors, the first service entrance based on an accessaddress of the first service in the first cluster.
 4. Thecomputer-implemented method of claim 1, wherein selecting the primaryregistry controller from the plurality of registry controllers based onthe plurality of states comprises: predicting, by the one or moreprocessors, a plurality of future states of the plurality of devicesbased on the plurality of states and a state predicting model,respectively, the state predicting model representing an associationbetween a state of a device for a future time duration and a state ofthe device at a historical time point.
 5. The computer-implementedmethod of claim 1, wherein the primary registry controller is selectedin response to any of: a predefined timer being expired; and a failureoccurring in the primary registry controller.
 6. Thecomputer-implemented method of claim 1, wherein the providing the firstservice entrance to the second cluster comprises: adding, by the one ormore processors, the first service entrance into a message queue; anddistributing, by the one or more processors, the message queue to thesecond cluster.
 7. The computer-implemented method of claim 6, whereinthe distributing the message queue comprises: generating, by the one ormore processors, a message packet by encoding the message queue and aredundancy portion of the message queue; and transmitting, by the one ormore processors, the generated message packet to a second registrycontroller that is deployed in the second cluster.
 8. Thecomputer-implemented method of claim 1, wherein the first and secondclusters have heterogeneous frameworks, and the method furthercomprises: instructing, by one or more processors, the second service tocall the first service by using the first service entrance.
 9. Acomputer system, comprising a computer processor coupled to acomputer-readable memory device, the memory device comprisinginstructions that when executed by the computer processor implements amethod comprising: obtaining a first service record for a first servicethat is deployed in a first cluster in a distributed system, the firstservice record being represented in a global registry format defined inthe distributed system; monitoring a plurality of states of a pluralityof devices; selecting a primary registry controller from a plurality ofregistry controllers based on the plurality of states, wherein thecomputer-implemented method is executed at the primary registrycontroller that is deployed in a first cluster in the distributedsystem; determining a first service entrance for calling the firstservice based on the first service record, the first service entranceenabling a second service to call the first service, the second servicebeing deployed in a second cluster in the distributed system; andproviding the first service entrance to the second cluster.
 10. Thecomputer system of claim 9, wherein the obtaining the first servicerecord comprises: receiving the first service record from a firstregistry controller that is deployed in the first cluster, the firstservice record being generated by the first registry controller based ona local service record that is represented in a local registry formatdefined in the first cluster.
 11. The computer system of claim 9,wherein the determining the first service entrance for the first servicecomprises: determining the first service entrance based on an accessaddress of the first service in the first cluster.
 12. The computersystem of claim 9, wherein selecting the primary registry controllerfrom the plurality of registry controllers based on the plurality ofstates comprises: predicting a plurality of future states of theplurality of devices based on the plurality of states and a statepredicting model, respectively, the state predicting model representingan association between a state of a device for a future time durationand a state of the device at a historical time point.
 13. The computersystem of claim 9, wherein the primary registry controller is selectedin response to any of: a predefined timer being expired; and a failureoccurring in the primary registry controller.
 14. The computer system ofclaim 9, wherein the providing the first service entrance to the secondcluster comprises: adding the first service entrance into a messagequeue; and distributing the message queue to the second cluster.
 15. Thecomputer system of claim 14, wherein the distributing the message queuecomprises: generating a message packet by encoding the message queue anda redundancy portion of the message queue; and transmitting thegenerated message packet to a second registry controller that isdeployed in the second cluster.
 16. A computer program product, thecomputer program product comprising a computer readable storage devicehaving program instructions embodied therewith, the program instructionsexecutable by an electronic device to cause the electronic device toperform a method, the method comprises: obtain a first service recordfor a first service that is deployed in a first cluster in a distributedsystem, the first service record being represented in a global registryformat defined in the distributed system; monitor a plurality of statesof a plurality of devices; select a primary registry controller from aplurality of registry controllers based on the plurality of states,wherein the computer-implemented method is executed at the primaryregistry controller that is deployed in a first cluster in thedistributed system; determining a first service entrance for calling thefirst service based on the first service record, the first serviceentrance enabling a second service to call the first service, the secondservice being deployed in a second cluster in the distributed system;and provide the first service entrance to the second cluster.
 17. Thecomputer program product of claim 16, wherein the obtaining the firstservice record comprises: receiving the first service record from afirst registry controller that is deployed in the first cluster, thefirst service record being generated by the first registry controllerbased on a local service record that is represented in a local registryformat defined in the first cluster.
 18. The computer program product ofclaim 16, wherein selecting the primary registry controller from theplurality of registry controllers based on the plurality of statescomprises: predicting a plurality of future states of the plurality ofdevices based on the plurality of states and a state predicting model,respectively, the state predicting model representing an associationbetween a state of a device for a future time duration and a state ofthe device at a historical time point.
 19. The computer program productof claim 16, wherein the primary registry controller is selected inresponse to any of: a predefined timer being expired; and a failureoccurring in the primary registry controller.
 20. The computer programproduct of claim 16, wherein the providing the first service entrance tothe second cluster comprises: adding the first service entrance into amessage queue; and distributing the message queue to the second cluster.